/*
*
==============================================================================
*  Name        : 
*  Part of     : Omen Game Engine
*  Description : 
*  Version     : 1.0
*
*  Copyright (c) 2013 Lauri Kortevaara.
* 
==============================================================================
*/

#pragma once

/// Omen Headers
#include "OmenConfig.h"
#include "OmenDataTypes.h"
#include "OmenProperty.h"

/// STL Headers
#include <map>
#include <string>


namespace Omen
{
    class OMEN_API IObject
    {
    public:
        virtual Omen_GUID classId() const = 0;    /// <summary>Defines the class ID</summary>
        virtual Omen_GUID objectId() const;       /// <summary>Defines the object instance ID</summary>

        //virtual std::unique_ptr<Omen::IObject> clone() = 0;
        
        virtual ~IObject();
        
        virtual IObject* const& parent() const;      /// <summary>Returns the parent object of this object</summary>
        virtual void setParent( IObject* const& );    /// <summary>Sets the parent pointer of this object</summary>

        virtual void setProperty( const std::wstring& propertyName, const std::wstring& propertyValue );
        virtual bool getProperty( const std::wstring& propertyName, std::wstring& propertyValue );

        virtual bool isDynamic() const; /// <summary>Returns true if this object acts as a dynamic physical object, false if it's just static</summary>
        virtual void setDynamic();      /// <summary>Sets this object as a dynamic physical object which can move around the scene using physical laws</summary>

        virtual std::wstring name() const;

    protected:
        IObject( Omen::IObject* pParent = 0 );

    private:
        Omen::IObject*    m_pParent;
        Omen_GUID         m_classId, m_objectId;

        #pragma warning(disable:4251) // Disable warning about private member variable needs to have dll-interface to be used by clients of class 'this'
        std::map<std::wstring, std::wstring> m_properties;
        #pragma warning(default:4251) // Disable warning about private member variable needs to have dll-interface to be used by clients of class 'this'
    };
}